﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcApplication1.Models;

namespace MvcApplication1.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "tralalala!";

            return View();
        }
        [HttpPost]
        public ActionResult Index( FormCollection forma)
        {
            string vrijednost = forma.Get("anketa");

            return Content(vrijednost);
        }

        public ActionResult About()
        {
            Model1Container mk = new Model1Container();
            Autor at = new Autor();
            at.ime = "slavko";
            at.prezime = "knjigic";
            mk.AutorSet.Add(at);
            mk.SaveChanges();
            return View();
        }
    }
}
